/*
 * @Description: 用于开发环境的一些配置
 *  
 * @Date: 2021-03-09 10:39:20
 */
const state = {
	devOpts: { allPower: false }, // 是否开启开发环境，所有按钮权限
}
const mutations = {
	// 更新开发环境配置
	updateDevOpts(state, parms) {
		state.devOpts = Object.assign(state.devOpts, parms)
		window.sessionStorage.setItem('devOpts', JSON.stringify(state.devOpts))
	},
}

const actions = {}
// 初始化开发配置
let devOpts = JSON.parse(window.sessionStorage.getItem('devOpts') || '{}')
mutations.updateDevOpts(state, devOpts)

export default {
	namespaced: true,
	state,
	mutations,
	actions,
}
